package pub.util;

import nc.bs.framework.common.RuntimeEnv;

import java.io.File;
import java.io.FileInputStream;
import java.util.Properties;

/**
 * 读取配置文件
 */
public  class LCPubCommon {

    public static   String filePath1 = RuntimeEnv.getInstance().getNCHome() + File.separator + "modules"
            + File.separator + "uapbd" + File.separator + "classes" + File.separator + "pub"
            + File.separator + "config" + File.separator + "lcssoconfig.properties";

    public static  String getFilePath(){
        return filePath1;
    }

    public static String getProperties(String key) {
        String value = "";
        try {
            FileInputStream fileis = new FileInputStream(filePath1);

            Properties properties = new Properties();

            properties.load(fileis);

            value = properties.getProperty(key);

        } catch (Exception e) {
        }
        return value;
    }

}
